3.1.31 \(\int \frac {(a+b \arctan (c x))^3}{x^2} \, dx\) [31]

3.1.31.1 Optimal result
3.1.31.2 Mathematica [A] (verified)
3.1.31.3 Rubi [A] (verified)
3.1.31.4 Maple [C] (warning: unable to verify)
3.1.31.5 Fricas [F]
3.1.31.6 Sympy [F]
3.1.31.7 Maxima [F]
3.1.31.8 Giac [F(-1)]
3.1.31.9 Mupad [F(-1)]

3.1.31.1 Optimal result

Integrand size = 14, antiderivative size = 116 \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=-i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1-i c x}\right )-3 i b^2 c (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )+\frac {3}{2} b^3 c \operatorname {PolyLog}\left (3,-1+\frac {2}{1-i c x}\right ) \]

output
-I*c*(a+b*arctan(c*x))^3-(a+b*arctan(c*x))^3/x+3*b*c*(a+b*arctan(c*x))^2*l 
n(2-2/(1-I*c*x))-3*I*b^2*c*(a+b*arctan(c*x))*polylog(2,-1+2/(1-I*c*x))+3/2 
*b^3*c*polylog(3,-1+2/(1-I*c*x))
 
3.1.31.2 Mathematica [A] (verified)

Time = 1.30 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.84 \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=-\frac {a^3}{x}-\frac {3 a^2 b \arctan (c x)}{x}+3 a^2 b c \log (x)-\frac {3}{2} a^2 b c \log \left (1+c^2 x^2\right )+3 a b^2 c \left (-\frac {\arctan (c x)^2}{c x}+2 \arctan (c x) \log \left (1-e^{2 i \arctan (c x)}\right )-i \left (\arctan (c x)^2+\operatorname {PolyLog}\left (2,e^{2 i \arctan (c x)}\right )\right )\right )+b^3 c \left (-\frac {i \pi ^3}{8}+i \arctan (c x)^3-\frac {\arctan (c x)^3}{c x}+3 \arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )+3 i \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+\frac {3}{2} \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )\right ) \]

input
Integrate[(a + b*ArcTan[c*x])^3/x^2,x]
 
output
-(a^3/x) - (3*a^2*b*ArcTan[c*x])/x + 3*a^2*b*c*Log[x] - (3*a^2*b*c*Log[1 + 
 c^2*x^2])/2 + 3*a*b^2*c*(-(ArcTan[c*x]^2/(c*x)) + 2*ArcTan[c*x]*Log[1 - E 
^((2*I)*ArcTan[c*x])] - I*(ArcTan[c*x]^2 + PolyLog[2, E^((2*I)*ArcTan[c*x] 
)])) + b^3*c*((-1/8*I)*Pi^3 + I*ArcTan[c*x]^3 - ArcTan[c*x]^3/(c*x) + 3*Ar 
cTan[c*x]^2*Log[1 - E^((-2*I)*ArcTan[c*x])] + (3*I)*ArcTan[c*x]*PolyLog[2, 
 E^((-2*I)*ArcTan[c*x])] + (3*PolyLog[3, E^((-2*I)*ArcTan[c*x])])/2)
 
3.1.31.3 Rubi [A] (verified)

Time = 0.68 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.19, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {5361, 5459, 5403, 5527, 7164}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx\)

\(\Big \downarrow \) 5361

\(\displaystyle 3 b c \int \frac {(a+b \arctan (c x))^2}{x \left (c^2 x^2+1\right )}dx-\frac {(a+b \arctan (c x))^3}{x}\)

\(\Big \downarrow \) 5459

\(\displaystyle -\frac {(a+b \arctan (c x))^3}{x}+3 b c \left (i \int \frac {(a+b \arctan (c x))^2}{x (c x+i)}dx-\frac {i (a+b \arctan (c x))^3}{3 b}\right )\)

\(\Big \downarrow \) 5403

\(\displaystyle -\frac {(a+b \arctan (c x))^3}{x}+3 b c \left (i \left (2 i b c \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{1-i c x}\right )}{c^2 x^2+1}dx-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2\right )-\frac {i (a+b \arctan (c x))^3}{3 b}\right )\)

\(\Big \downarrow \) 5527

\(\displaystyle -\frac {(a+b \arctan (c x))^3}{x}+3 b c \left (i \left (2 i b c \left (\frac {i \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right ) (a+b \arctan (c x))}{2 c}-\frac {1}{2} i b \int \frac {\operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right )}{c^2 x^2+1}dx\right )-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2\right )-\frac {i (a+b \arctan (c x))^3}{3 b}\right )\)

\(\Big \downarrow \) 7164

\(\displaystyle -\frac {(a+b \arctan (c x))^3}{x}+3 b c \left (i \left (2 i b c \left (\frac {i \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right ) (a+b \arctan (c x))}{2 c}-\frac {b \operatorname {PolyLog}\left (3,\frac {2}{1-i c x}-1\right )}{4 c}\right )-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2\right )-\frac {i (a+b \arctan (c x))^3}{3 b}\right )\)

input
Int[(a + b*ArcTan[c*x])^3/x^2,x]
 
output
-((a + b*ArcTan[c*x])^3/x) + 3*b*c*(((-1/3*I)*(a + b*ArcTan[c*x])^3)/b + I 
*((-I)*(a + b*ArcTan[c*x])^2*Log[2 - 2/(1 - I*c*x)] + (2*I)*b*c*(((I/2)*(a 
 + b*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 - I*c*x)])/c - (b*PolyLog[3, -1 + 2 
/(1 - I*c*x)])/(4*c))))
 

3.1.31.3.1 Defintions of rubi rules used

rule 5361
Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> 
 Simp[x^(m + 1)*((a + b*ArcTan[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m + 
1))   Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], 
x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] & 
& IntegerQ[m])) && NeQ[m, -1]
 

rule 5403
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_ 
Symbol] :> Simp[(a + b*ArcTan[c*x])^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Si 
mp[b*c*(p/d)   Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))]/(1 
 + c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2* 
d^2 + e^2, 0]
 

rule 5459
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), 
x_Symbol] :> Simp[(-I)*((a + b*ArcTan[c*x])^(p + 1)/(b*d*(p + 1))), x] + Si 
mp[I/d   Int[(a + b*ArcTan[c*x])^p/(x*(I + c*x)), x], x] /; FreeQ[{a, b, c, 
 d, e}, x] && EqQ[e, c^2*d] && GtQ[p, 0]
 

rule 5527
Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2 
), x_Symbol] :> Simp[I*(a + b*ArcTan[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x 
] - Simp[b*p*(I/2)   Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 - u]/(d 
+ e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2* 
d] && EqQ[(1 - u)^2 - (1 - 2*(I/(I + c*x)))^2, 0]
 

rule 7164
Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, 
x]}, Simp[w*PolyLog[n + 1, v], x] /;  !FalseQ[w]] /; FreeQ[n, x]
 
3.1.31.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.91 (sec) , antiderivative size = 1862, normalized size of antiderivative = 16.05

\[\text {Expression too large to display}\]

input
int((a+b*arctan(c*x))^3/x^2,x)
 
output
c*(-a^3/c/x+b^3*(-1/c/x*arctan(c*x)^3+3*ln(c*x)*arctan(c*x)^2-3/2*arctan(c 
*x)^2*ln(c^2*x^2+1)+3*arctan(c*x)^2*ln((1+I*c*x)/(c^2*x^2+1)^(1/2))-3*arct 
an(c*x)^2*ln((1+I*c*x)^2/(c^2*x^2+1)-1)-I*arctan(c*x)^3+3/4*(I*Pi*csgn(I*( 
1+I*c*x)^2/(c^2*x^2+1))*csgn(I*(1+I*c*x)^2/(c^2*x^2+1)/(1+(1+I*c*x)^2/(c^2 
*x^2+1))^2)^2-2*I*Pi*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2* 
x^2+1)))^2-I*Pi*csgn(I*(1+I*c*x)/(c^2*x^2+1)^(1/2))^2*csgn(I*(1+I*c*x)^2/( 
c^2*x^2+1))-2*I*Pi*csgn(I*(1+(1+I*c*x)^2/(c^2*x^2+1)))*csgn(I*(1+(1+I*c*x) 
^2/(c^2*x^2+1))^2)^2+I*Pi*csgn(I/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)*csgn(I*(1+ 
I*c*x)^2/(c^2*x^2+1)/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)^2+2*I*Pi*csgn(I*((1+I* 
c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^3-2*I*Pi*csgn(I*((1+I*c 
*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))*csgn(((1+I*c*x)^2/(c^2*x 
^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2+I*Pi*csgn(I*(1+(1+I*c*x)^2/(c^2*x^ 
2+1)))^2*csgn(I*(1+(1+I*c*x)^2/(c^2*x^2+1))^2)+2*I*Pi*csgn(((1+I*c*x)^2/(c 
^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^3+2*I*Pi*csgn(I*((1+I*c*x)^2/(c^ 
2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/ 
(1+(1+I*c*x)^2/(c^2*x^2+1)))-I*Pi*csgn(I*(1+I*c*x)^2/(c^2*x^2+1))^3-I*Pi*c 
sgn(I*(1+I*c*x)^2/(c^2*x^2+1)/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)^3-2*I*Pi*csgn 
(I*((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2*csgn(I*((1+I 
*c*x)^2/(c^2*x^2+1)-1))+2*I*Pi*csgn(I*(1+I*c*x)/(c^2*x^2+1)^(1/2))*csgn(I* 
(1+I*c*x)^2/(c^2*x^2+1))^2+2*I*Pi-I*Pi*csgn(I/(1+(1+I*c*x)^2/(c^2*x^2+1...
 
3.1.31.5 Fricas [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{3}}{x^{2}} \,d x } \]

input
integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="fricas")
 
output
integral((b^3*arctan(c*x)^3 + 3*a*b^2*arctan(c*x)^2 + 3*a^2*b*arctan(c*x) 
+ a^3)/x^2, x)
 
3.1.31.6 Sympy [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right )^{3}}{x^{2}}\, dx \]

input
integrate((a+b*atan(c*x))**3/x**2,x)
 
output
Integral((a + b*atan(c*x))**3/x**2, x)
 
3.1.31.7 Maxima [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{3}}{x^{2}} \,d x } \]

input
integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="maxima")
 
output
-3/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*a^2*b - a^3/x - 1 
/32*(4*b^3*arctan(c*x)^3 - 3*b^3*arctan(c*x)*log(c^2*x^2 + 1)^2 - (7*b^3*c 
*arctan(c*x)^4 + 32*a*b^2*c*arctan(c*x)^3 + 96*b^3*c^2*integrate(1/32*x^2* 
arctan(c*x)*log(c^2*x^2 + 1)^2/(c^2*x^4 + x^2), x) - 384*b^3*c^2*integrate 
(1/32*x^2*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^4 + x^2), x) + 384*b^3*c*int 
egrate(1/32*x*arctan(c*x)^2/(c^2*x^4 + x^2), x) - 96*b^3*c*integrate(1/32* 
x*log(c^2*x^2 + 1)^2/(c^2*x^4 + x^2), x) + 896*b^3*integrate(1/32*arctan(c 
*x)^3/(c^2*x^4 + x^2), x) + 96*b^3*integrate(1/32*arctan(c*x)*log(c^2*x^2 
+ 1)^2/(c^2*x^4 + x^2), x) + 3072*a*b^2*integrate(1/32*arctan(c*x)^2/(c^2* 
x^4 + x^2), x))*x)/x
 
3.1.31.8 Giac [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\text {Timed out} \]

input
integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="giac")
 
output
Timed out
 
3.1.31.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^3}{x^2} \,d x \]

input
int((a + b*atan(c*x))^3/x^2,x)
 
output
int((a + b*atan(c*x))^3/x^2, x)